package com.etc.controller;

import com.etc.service.SysStaftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("staff")
public class StaffController {

    @Autowired
    private SysStaftService sysStaftService;


    /**
     * 查询所有员工
     * @param request
     * @return
     */
    @RequestMapping("staff")
    public String satff(HttpServletRequest request,String page){
        request.setAttribute("satff",sysStaftService.findSysStaff(Integer.valueOf(page)));
        return "worker";

    }
}
